﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsTest
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        string[] paths = Directory.GetFiles(@"H:\相片记录\永远的记忆\结婚照\翟超  赵丹（二改）");
        private int i = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            i++;
            if (i == paths.Length - 1)
            {
                i = 0;
            }
            this.pictureBox1.Image = Image.FromFile(paths[i]);
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            this.pictureBox1.Image = Image.FromFile(paths[0]);
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
        }
    }
}
